<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>ClipOutput</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">ClipOutput()</font></b></p>
<p><b>语法</b></p><blockquote>
<font color="#006666"><b>ClipOutput</b></font>(x, y, Width, Height)    </blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Define a bounding box that restricts all drawing to the current drawing 
output. Any pixels drawn outside of this box will be clipped. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>x, y, Width, Height</i></td>
<td width="90%"> 
 
The position and size of the clipping box. The (x, y) coordinates are always absolute 
and not affected by calls to <a href="setorigin.html">SetOrigin()</a>. 

 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>
无.


</blockquote><p><b>Remarks</b></p><blockquote>



This command only has an effect on drawing outputs created by <a href="../image/imageoutput.html">ImageOutput()</a> or <a href="../gadget/canvasoutput.html">CanvasOutput()</a>. 
<br>
<br>
The drawing origin is not modified by a call to this function. To make all drawing 
relative to the upper left corner of the clipping box, a separate call to 
<a href="setorigin.html">SetOrigin()</a> must be made if this is desired. 
<br>
<br>
The <a href="plot.html">Plot()</a> and <a href="point.html">Point()</a> commands perform no bounds checking for performance reasons and 
therefore are also not affected by this command. 

 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">If</font></b> <font color="#006666">OpenWindow</font>(0, 0, 0, 200, 200, "2DDrawing Example", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
    <b><font color="#006666">If</font></b> <font color="#006666">CreateImage</font>(0, 200, 200, 24, $FFFFFF) <b><font color="#006666">And</font></b> <font color="#006666">StartDrawing</font>(<font color="#006666">ImageOutput</font>(0))

<font color="#006666">      ClipOutput</font>(50, 50, 100, 100) <font color="#006666">; restrict all drawing to this region</font>
<font color="#006666">      Circle</font>( 50,  50, 50, $0000FF)  
<font color="#006666">      Circle</font>( 50, 150, 50, $00FF00)  
<font color="#006666">      Circle</font>(150,  50, 50, $FF0000)  
<font color="#006666">      Circle</font>(150, 150, 50, $00FFFF)  
      
<font color="#006666">      DrawingMode</font>(<font color="#924B72">#PB_2DDrawing_Outlined</font>)
<font color="#006666">      Box</font>(50, 50, 100, 100, $000000)
         
<font color="#006666">      StopDrawing</font>() 
<font color="#006666">      ImageGadget</font>(0, 0, 0, 200, 200,<font color="#006666"> ImageID</font>(0))      
    <b><font color="#006666">EndIf</font></b>
    
    <b><font color="#006666">Repeat</font></b>
      Event =<font color="#006666"> WaitWindowEvent</font>()
    <b><font color="#006666">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#006666">EndIf</font></b>
</font></pre>

<br>
<p><img src="../HelpPictures/clipoutput.png"></p>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="unclipoutput.html">UnclipOutput()</a>, <a href="setorigin.html">SetOrigin()</a>, <a href="outputwidth.html">OutputWidth()</a>, <a href="outputheight.html">OutputHeight()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=circulargradient.html>CircularGradient()</a> - <a href=index.html>2DDrawing Index</a> - <a href=conicalgradient.html>ConicalGradient()</a> -&gt;



</body></html>